#ifndef PERFSONAR_LS_CLIENT_H
#define PERFSONAR_LS_CLIENT_H

#include "perfsonar_service.h"

#include <libxml/tree.h>
#include <libxml/xpath.h>

typedef struct ls_query_request_t {
	int id;
	char *query;
	int succeeded;
	char *error;
	xmlNodePtr response;
} lsQuery;

int perfsonar_ls_query(const char *url, lsQuery *queries, int num_queries);
int perfsonar_ls_register(const char *url, perfSONARService *service, char **metadata, int metadata_count, char **ls_key);
int perfsonar_ls_keepalive(const char *url, const char *ls_key);

xmlXPathObjectPtr perfsonar_xpath_find(xmlNodePtr node, const char *xpath, xmlXPathContextPtr *state_ptr);
int perfsonar_xpath_findvalue(xmlNodePtr node, const char *xpath, xmlXPathContextPtr *state_ptr, char **ret_value);

#endif
